#include "bits/stdc++.h"
using namespace std;
using ll = long long;
const int N = 1009; //100005

int m[N][N];
int n;
int sum = INT_MIN,tmp;
bool flag = false;
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0),cout.tie(0);
	cin >> n;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
		{
			cin >> m[i][j];
			if(m[i][j] == 0) 
				flag = true;
		}
			
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=n;j++)
		{
			if(m[i][j]==0)
			{
				int up,down,leftt,rightt;
				up = i-1;down = i+1;
				leftt = j-1;rightt = j+1;
				tmp = 0;
				while(up>=1)
				{
					if(m[up][j]>0)
					{
						tmp += m[up][j];
					}
					up--;
				}
				while(down<=n)
				{
					if(m[down][j]>0)
					{
						tmp += m[down][j];
					}
					down++;
				}
				while(leftt>=1)
				{
					if(m[i][leftt]>0)
					{
						tmp += m[i][leftt];
					}
					leftt--;
				}
				while(rightt<=n)
				{
					if(m[i][rightt]>0)
					{
						tmp += m[i][rightt];
					}
					rightt++;
				}
				sum = max(sum,tmp);
			}
		}
	}
	if(flag)
		cout << sum;
	else
		cout << "Bad Game!";
	return 0;
}
